package ztc.common;

/**
 * Created by ztc on 16-4-8.下午7:54
 */
public class Constant {
    //private static final String path=Class.class.getClass().getResource("/").getPath();
    public static final String DRIVER_CLASS = "com.mysql.jdbc.Driver";
    public static final String DATABASE_URL ="jdbc:mysql://localhost:3306/qrcode1?useUnicode=true&characterEncoding=UTF-8";
    public static final String DATABASE_USRE ="root";
    public static final String DATABASE_PASSWORD=" ";
    //分隔符
    public static final String separator="^";
    /*
    public static String getDatabaseUsre(){
        File file=new File(path+"dbuser");
        String info="";
        try {
            FileInputStream fis=new FileInputStream(file);
            byte[] buffer=new byte[1024];
            int count;
            while((count=fis.read(buffer))!=-1){
                String inf=new String(buffer,0,count);
                info+=inf;
            }
            System.out.println(info);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return info;
    }
    public static String getDatabasePassword(){
        File file=new File(path+"dbpwd");
        String info="";
        try {
            FileInputStream fis=new FileInputStream(file);
            byte[] buffer=new byte[1024];
            int count;
            while((count=fis.read(buffer))!=-1){
                String inf=new String(buffer,0,count);
                info+=inf;
            }
            System.out.println(info);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return info;
    }
    public static void main(String[] args){
        //System.out.println(getDatabaseUsre());
        //System.out.println(getDatabasePassword());
    }
    */
}